Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMapTiles implementation: Add missing attributes to transportation and places layer #542

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

Nakaner
Copy link
Contributor

@Nakaner Nakaner commented Sep 26, 2023

A client complained about missing attributes. I compared the implementation with the schema and fixed the differences.

I found differences w.r.t. to the pois layer as well but I will offer those in a separate pull request.

This adds following attributes according to the documentation: surface,
mtb_scale, expressway, access, bicycle, foot, horse, toll, layer
Original OpenMapTiles joins ne_10m_populated_places and OSM places by their Wikidata ID (and names as fallback).
We do not use NaturalEarth, therefore we rely on population and capital
only to calculate the rank.
@systemed
Copy link
Owner

systemed commented Oct 5, 2023

Thank you!

One refinement you could use - and this is my fault for not documenting it - is that you can actually specify the minimum zoom level at which an attribute is written. You do this by supplying a third parameter to the :Attribute method, e.g.

way:Attribute("surface", "paved", 12)

Could I suggest a slight rewrite to use this? It should simplify the code because you won't need to have all the extra layers, you can just write it once but set the minzoom on each attribute. And I'll fix the documentation. :)

Make use of the new way:Attribute(name, value, minzoom) function.
@Nakaner
Copy link
Contributor Author

Nakaner commented Nov 17, 2023

@systemed I rewrote the code.

@systemed systemed merged commit fc927be into systemed:master Nov 17, 2023
5 checks passed
@systemed
Copy link
Owner

Excellent - thank you!

@Nakaner Nakaner deleted the openmaptiles-bugfixes branch February 21, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants